Page({
    data: {
        src: "",
        controls: !0,
        autoplay: !0,
        loop: !1,
        muted: !1,
        "show-play-btn": !0,
        "show-center-play-btn": !0,
        poster: "",
        title: "",
        showDetail: !1,
        show: !0,
        resource: 0
    },
    onLoad: function(t) {
        console.log(t);
        var a = this, e = t.resource ? t.resource : 0;
        t.id && t.id, t.actEndTime && t.actEndTime, t.at_id && t.at_id;
        wx.getSystemInfo({
            success: function(t) {
                a.setData({
                    width: t.screenWidth + 3,
                    height: t.screenHeight - 70
                });
            }
        });
        var o = t.url;
        a.setData({
            src: o,
            g_id: t.id,
            at_end_time: t.actEndTime,
            at_id: t.at_id,
            resource: e
        });
    },
    play: function(t) {
        console.log(t);
        var a = this;
        wx.createVideoContext("video", this);
        a.setData({
            show: !1,
            showDetail: !0
        });
    },
    end: function() {},
    fullScreen: function(t) {
        var a = this;
        if (console.log(a.data.status), 0 == a.data.status) {
            var e = t.detail.fullScreen;
            console.log(e), e ? (console.log(e), a.setData({
                showDetail: !0
            })) : wx.navigateBack({});
        }
    },
    togoodsDetail: function(t) {
        var a = this;
        a.setData({
            status: 1
        }), console.log(a.data.resource), 1 != a.data.resource && 2 != a.data.resource || wx.navigateBack({}), 
        0 == a.data.resource && wx.redirectTo({
            url: "/pages/goods/goodsDetail?id=" + a.data.g_id + "&&actEndTime=" + a.data.at_end_time + "&&at_id=" + a.data.at_id
        }), 3 == a.data.resource && wx.redirectTo({
            url: "/pages/goods/goodsDetail?id=" + a.data.g_id
        }), console.log("/pages/goods/goodsDetail?id=" + a.data.g_id + "&&actEndTime=" + a.data.at_end_time + "&&at_id=" + a.data.at_id);
    }
});